package com.cn.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.cn.pojo.TypeInfo;

public interface TypeDao {
	@Insert("insert into typeinfo(type,url) value(#{type},#{url})")
	boolean addType(@Param("type")String type,@Param("url")String url);
	@Select("select id,type,url from typeinfo")
	List<TypeInfo> findAll();
	@Select("select id,type,url from typeinfo where id=#{id}")
	TypeInfo selectById(Integer id);
	@Delete("delete from typeinfo where id=#{id}")
	boolean deleteType(Integer id);
}
